try { var dummy = TraceEvents; } catch ( e ) {


function TraceEvents(){
}

// Required for AS 1 inheritance.
TraceEvents.prototype = new RTCFComponent();


TraceEvents.prototype.init = function(){
	this.rtcf.addListener("onConnect", this);
	this.rtcf.addListener("onAuthenticate", this);
	this.rtcf.addListener("onAuthorize", this);
	this.rtcf.addListener("onAuthorizedConnect", this);
	this.rtcf.addListener("onAuthorizedDisconnect", this);
	this.rtcf.addListener("onRejectedDisconnect", this);
	this.rtcf.addListener("onAppStart", this);
	this.rtcf.addListener("onAppStop", this);
	this.rtcf.addListener("onStatus", this);
	this.rtcf.addListener("onPublish", this);
	this.rtcf.addListener("onUnpublish", this);
		
}


TraceEvents.prototype.onConnect = function(client){
	trace("TraceEvents.onConnect> client: " + client + ", number of arguments: " + arguments.length);
	for (var i = 1; i < arguments.length; i++) trace("   arguments[" + i + "]: " + arguments[i]);
	for (var p in client) if (typeof client[p] != "function" && client[p] != "") trace("   client." + p + ": " + client[p] );
	this.rtcf.authenticationFault(client, ""); 
}

TraceEvents.prototype.onAuthenticate = function(client, user){
	trace("TraceEvents.onAuthenticate> client: " + client + ", number of arguments: " + arguments.length);
	this.rtcf.authorizationResult(client, user); 
}

TraceEvents.prototype.onAuthorize = function(client){
	trace("TraceEvents.onAuthorize> client: " + client + ", number of arguments: " + arguments.length);
}

TraceEvents.prototype.onAuthorizedConnect = function(client){
	trace("TraceEvents.onAuthorizedConnect> client: " + client + ", number of arguments: " + arguments.length);
}

TraceEvents.prototype.onAuthorizedDisconnect = function(client){
	trace("TraceEvents.onAuthorizedDisconnect> client: " + client + ", number of arguments: " + arguments.length);
}

TraceEvents.prototype.onRejectedDisconnect = function(client){
	trace("TraceEvents.onRejectedDisconnect> client: " + client + ", number of arguments: " + arguments.length);
}

TraceEvents.prototype.onAppStart = function(){
	trace("TraceEvents.onAppStart>");
}

TraceEvents.prototype.onAppStop = function(client){
	trace("TraceEvents.onAppStop> ");
}
TraceEvents.prototype.onStatus = function(){
	trace("TraceEvents.onStatus> arguments.length: " + arguments.length);
}

TraceEvents.prototype.onPublish = function(client){
	trace("TraceEvents.onPublish> " );
}

TraceEvents.prototype.onUnpublish = function(client){
	trace("TraceEvents.onUnpublish>  ");
}




} // end catch


/** Output:
TraceEvents.onAppStart>
AnonymousAuth.onConnect> client: [object Client], displayName: hi, number of arguments: 3
TraceEvents.onAuthenticate> client: [object Client], number of arguments: 2
TraceEvents.onAuthorize> client: [object Client], number of arguments: 2
TraceEvents.onAuthorizedConnect> client: [object Client], number of arguments: 2
TraceEvents.onConnect> client: [object Client], number of arguments: 3
   arguments[1]: hi
   arguments[2]: there
   client.rtcf: [object Object]
   client.agent: WIN 10,0,22,91
   client.ip: 127.0.0.1
   client.readAccess: /
   client.writeAccess: /
   client.audioSampleAccess: 
   client.videoSampleAccess: 
   client.referrer: 
   client.protocol: rtmp
   client.uri: rtmp://localhost/rtcf
   client.secure: false
   client.pageUrl: 
   client.virtualKey: 
   client.id: CNAIAimI
   client.nearID: 
   client.farID: 
   client.nearNonce: 
   client.farNonce: 
TraceEvents.onAuthorizedDisconnect> client: [object Client], number of arguments: 1
*/
